﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RoomOccupantReport.aspx.cs" Inherits="DelonixRegiaHotel.RoomOccupantReport" EnableEventValidation="false" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <style type="text/css">
        .auto-style1 {
            width: 1270px;
            height: 702px;
        }
        .auto-style3 {
            height: 60px;
        }
        .auto-style4 {
            height: 52px;
        }
        .auto-style6 {
            height: 280px;
            margin-left: 40px;
        }
        .auto-style7 {
            width: 1270px;
        }
        .auto-style8 {
            height: 52px;
            width: 135px;
        }
        </style>
</head>
<body style='background: #000'>
    <form id="form1" runat="server">
    <div>
    
        <table cellspacing="0" class="auto-style1" style="background-image:url(Images/TemplateForHome.png); background-size: cover;">
            <tr>
            <td class="auto-style3" colspan="9">
                <asp:ImageButton ID="btnLogo" runat="server" CausesValidation="False" ImageUrl="~/Images/Delonix Regia Logo.png" OnClick="btnLogo_Click" />
            </td>
            <td class="auto-style3">
                <asp:ImageButton ID="btnLogout" runat="server" CausesValidation="False" ImageUrl="~/Images/Logout.png" OnClick="btnLogout_Click" />
            </td>
        </tr>
        <tr>
            <td class="auto-style4">&nbsp;&nbsp;&nbsp;</td>
            <td class="auto-style4">
                <asp:ImageButton ID="btnAdmin" runat="server" CausesValidation="False" ImageUrl="~/Images/Admin.png" OnClick="btnAdmin_Click" />
            </td>
            <td class="auto-style4">
                <asp:ImageButton ID="btnCheckIn" runat="server" CausesValidation="False" ImageUrl="~/Images/Check-In.png" OnClick="btnCheckIn_Click" />
            </td>
            <td class="auto-style4">
                <asp:ImageButton ID="btnCheckOut" runat="server" CausesValidation="False" ImageUrl="~/Images/Check-Out.png" OnClick="btnCheckOut_Click" />
            </td>
            <td class="auto-style4">
                <asp:ImageButton ID="btnQuery" runat="server" CausesValidation="False" ImageUrl="~/Images/Query.png" OnClick="btnQuery_Click" />
            </td>
            <td class="auto-style4">
                <asp:ImageButton ID="btnBooking" runat="server" CausesValidation="False" ImageUrl="~/Images/Booking.png" OnClick="btnBooking_Click" />
            </td>
            <td class="auto-style4">
                <asp:ImageButton ID="btnRates" runat="server" CausesValidation="False" ImageUrl="~/Images/Rates.png" OnClick="btnRates_Click" />
            </td>
            <td class="auto-style4">
                <asp:ImageButton ID="btnStaff" runat="server" CausesValidation="False" ImageUrl="~/Images/Staff.png" OnClick="btnStaff_Click" />
            </td>
            <td class="auto-style8">
                <asp:ImageButton ID="btnReport" runat="server" CausesValidation="False" ImageUrl="~/Images/Report.png" OnClick="btnReport_Click" />
            </td>
            <td class="auto-style4">&nbsp;</td>
        </tr>
        <tr>
            <td class="auto-style6" colspan="10">
                <asp:Label ID="Label1" runat="server" ForeColor="Red" Text="Room Occupant Report"></asp:Label>
                <br />
                <br />
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="room_num" DataSourceID="SqlDataSource1" EmptyDataText="There are no data records to display." ForeColor="Yellow">
                    <Columns>
                        <asp:BoundField DataField="room_num" HeaderText="room_num" ReadOnly="True" SortExpression="room_num" />
                        <asp:BoundField DataField="room_type" HeaderText="room_type" SortExpression="room_type" />
                        <asp:BoundField DataField="check_in_date" HeaderText="check_in_date" SortExpression="check_in_date" />
                        <asp:BoundField DataField="check_out_date" HeaderText="check_out_date" SortExpression="check_out_date" />
                        <asp:BoundField DataField="first_name" HeaderText="first_name" SortExpression="first_name" />
                        <asp:BoundField DataField="last_name" HeaderText="last_name" SortExpression="last_name" />
                        <asp:BoundField DataField="bed_sizes" HeaderText="bed_sizes" SortExpression="bed_sizes" />
                        <asp:BoundField DataField="smoking_room" HeaderText="smoking_room" SortExpression="smoking_room" />
                        <asp:BoundField DataField="adult" HeaderText="adult" SortExpression="adult" />
                        <asp:BoundField DataField="child" HeaderText="child" SortExpression="child" />
                    </Columns>
                </asp:GridView>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:hoteldbConnectionString %>" DeleteCommand="DELETE FROM [HotelGuest] WHERE [room_num] = @room_num" InsertCommand="INSERT INTO [HotelGuest] ([first_name], [child], [room_type], [bed_sizes], [smoking_room], [room_num], [last_name], [check_in_date], [check_out_date], [adult]) VALUES (@first_name, @child, @room_type, @bed_sizes, @smoking_room, @room_num, @last_name, @check_in_date, @check_out_date, @adult)" SelectCommand="SELECT [first_name], [child], [room_type], [bed_sizes], [smoking_room], [room_num], [last_name], [check_in_date], [check_out_date], [adult] FROM [HotelGuest]" UpdateCommand="UPDATE [HotelGuest] SET [first_name] = @first_name, [child] = @child, [room_type] = @room_type, [bed_sizes] = @bed_sizes, [smoking_room] = @smoking_room, [last_name] = @last_name, [check_in_date] = @check_in_date, [check_out_date] = @check_out_date, [adult] = @adult WHERE [room_num] = @room_num">
                    <DeleteParameters>
                        <asp:Parameter Name="room_num" Type="String" />
                    </DeleteParameters>
                    <InsertParameters>
                        <asp:Parameter Name="first_name" Type="String" />
                        <asp:Parameter Name="child" Type="String" />
                        <asp:Parameter Name="room_type" Type="String" />
                        <asp:Parameter Name="bed_sizes" Type="String" />
                        <asp:Parameter Name="smoking_room" Type="String" />
                        <asp:Parameter Name="room_num" Type="String" />
                        <asp:Parameter Name="last_name" Type="String" />
                        <asp:Parameter Name="check_in_date" Type="String" />
                        <asp:Parameter Name="check_out_date" Type="String" />
                        <asp:Parameter Name="adult" Type="String" />
                    </InsertParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="first_name" Type="String" />
                        <asp:Parameter Name="child" Type="String" />
                        <asp:Parameter Name="room_type" Type="String" />
                        <asp:Parameter Name="bed_sizes" Type="String" />
                        <asp:Parameter Name="smoking_room" Type="String" />
                        <asp:Parameter Name="last_name" Type="String" />
                        <asp:Parameter Name="check_in_date" Type="String" />
                        <asp:Parameter Name="check_out_date" Type="String" />
                        <asp:Parameter Name="adult" Type="String" />
                        <asp:Parameter Name="room_num" Type="String" />
                    </UpdateParameters>
                </asp:SqlDataSource>
                <br />
                <asp:Button ID="btnExport" runat="server" BackColor="Black" BorderColor="Red" BorderWidth="3px" ForeColor="Red" OnClick="btnExport_Click" Text="ExportTo Excel" />
                &nbsp;
                <asp:Button ID="btnExport2" runat="server" BackColor="Black" BorderColor="Red" BorderWidth="3px" ForeColor="Red" OnClick="btnExport2_Click" Text="Export To Microsoft Doc" />
                <br />
            </td>
        </tr>
        <tr>
            <td class="auto-style7" colspan="10">&nbsp;</td>
        </tr>
        </table>
    
    </div>
    </form>
</body>
</html>